# -*- coding:utf-8 -*-
from __future__ import division
from dao.MySqlDAL import MySqlDAL
__author__ = 'shudongma.msd(风骐)'

sqlUtil = MySqlDAL()
def getStockDetail():
    res = sqlUtil.get_dimensions_rows("SELECT stock_id,stock_name,market_value,plate,plate_id FROM tb_stock_info")
    detail = dict() # {stock_id:{}}
    for row in res:
        row['plate_id'] = int(row['plate_id'])
        detail[row.pop('stock_id')] = row
    return detail
#
# for k,v in getStockDetail().iteritems():
#     print k,v